<extend name="Index/index" />

<block name="mycss"></block>

<block name="main">
    <div class="container">
        <div class="row">
            
            <!-- 主体搜索主体内容 -->
            <div class="col-md-7 col-md-offset-1">
                
                <!-- 类型选择 -->
                <div class="w100">
                    <h5>
                        <span class="glyphicon glyphicon-list-alt"></span>
                        &nbsp;&nbsp;编辑推荐
                    </h5>
                    <div class="divline mt20 mb10"></div>
                </div>
                <div class="w100 searchlist">
                    <ul>
                        <li><a href="<{:U('Explore/index', array(type=>'question','name'=>$name))}>">问题</a></li>
                        <li><a href="<{:U('Explore/index', array(type=>'article','name'=>$name))}>">文章</a></li>
                    </ul>
                </div>
                <div class="clearfix"></div>
                <div class="divline"></div>
                <!-- 内容展示 -->
                <div class="w100">
                    <div class="mt30"> <!-- 间隔 -->
                        <!-- 问题 -->
                        <if condition="$type eq 'question'">
                            <!-- 判断数据是否为空 -->
                            <empty name="data">
                                <div class="w100 h5 mt10 text-center" style="background-color:#eee; height: 80px; line-height: 80px;">暂无更多问题推荐</div>
                            <else/>
                                <div class="w100 h5 text-center" style="background-color:#eee; height: 50px; line-height: 50px;">以下为您显示最新问题
                                </div>
                                <div class="mt10"></div>
                                <!-- 遍历搜索到的问题 -->
                                <div class="w100 mt10">
                                    <volist name="data" id="vo">
                                        <div class="w100">
                                            <div class="mt20">
                                                <a href="<{:U('Question/detail','qid='.$vo['qid'])}>" target="_blank"><b><{$vo.qname}></b></a>
                                                &nbsp;&nbsp;&nbsp;&nbsp;
                                                <a class="h6" style="color:#000" href="<{:U('People/index','uid='.$vo['quid'])}>" target="_blank"><{$vo.quname}></a>
                                                &nbsp;&nbsp;&nbsp;&nbsp;
                                                <{$vo.qanum}>个回答&nbsp;&nbsp;
                                            </div>
                                            <div class="mt10"><a href="" class="attend h6" question_id="<{$vo.qid}>"><span class="glyphicon glyphicon-plus"></span>关注问题</a>&ensp;</div>
                                            <div class="mt10"></div>

                                            <notempty name="vo.aid">
                                            <!-- 不空显示回答的信息 -->
                                                <div class="w100"  style="font-size:12px;">
                                                    <p>
                                                        <a href="<{:U('Question/detail',array('qid'=>$vo['qid'],'aid'=>$vo['aid']))}>" target="_blank" style=" color:#000">&ensp;&ensp;&ensp;&ensp;<{$vo.apart}>...</a>
                                                    </p>
                                                    <p class="h6 mt10">
                                                        回答时间: <{$vo.atime}> &nbsp;&nbsp; &nbsp;&nbsp;
                                                        <a href="" class="zan" zan="0" zannum="<{$vo.azan}>" question_id="<{$vo.qid}>" answer_id="<{$vo.aid}>" style="color:#666"><{$vo.azan}> 人赞同</a>&ensp;&nbsp;
                                                        <{$vo.adnum}>评论 &nbsp;&nbsp; &nbsp;&nbsp;
                                                    </p>
                                                </div>
                                            </notempty>
                                            <!-- <div class="mt10"></div> -->
                                            <div class="divline mt20"></div>
                                            

                                        </div>
                                    </volist>
                                </div>

                                <div class="mt20"></div>
                                <div class="w100">
                                    <a href="<{:U('Explore/index', array('name'=>$name, 'type'=>'question','p'=>$p))}>" class="btn btn-sm btn-default form-control">查看更多问题</a>
                                </div>
                                <div class="mb50"></div>
                            </empty>
                        </if>

                        <!-- 文章 -->
                        <if condition="$type eq 'article'">
                            <!-- 判断数据是否为空 -->
                            <empty name="data">
                                <div class="w100 h5 mt10 text-center" style="background-color:#eee; height: 80px; line-height: 80px;">暂无更多推荐文章</div>
                            <else/>
                                <div class="w100 h5 text-center" style="background-color:#eee; height: 50px; line-height: 50px;">以下为您显示推荐文章
                                </div>
                                <div class="mt10"></div>
                                <!-- 遍历推荐的文章 -->
                                <volist name="data" id="vo">
                                    <div class="w100 mt20" style="border-bottom: 1px dashed #ccc">
                                        <p class="mt20 mb20 h4"><a href="<{:U('Article/show','arid='.$vo['arid'])}>"><b><{$vo.artitle}></b></a></p>
                                        <div class="w100">
                                            <notempty name="vo.arimage">
                                                <!--  -->
                                                <div class="w40 pull-left">
                                                    <img src="__PUBLIC__/imgs/<{$vo.arimage}>" height="150px" width="220px" style="border-radius: 10px;">
                                                </div>
                                                <div class="w60 pull-left">
                                                    <p>
                                                        <{$vo.part}>...&nbsp;&nbsp;
                                                        <a href="<{:U('Article/show','arid='.$vo['arid'])}>">查看全文</a>
                                                    </p>
                                                    <p class="h6">
                                                        文章作者: &nbsp;&nbsp;<a href="<{:U('People/index','uid='.$vo['uid'])}>"><{$vo.uname}></a>&nbsp;&nbsp;
                                                        <b><{$vo.artime}></b>&nbsp;&nbsp;
                                                        <!-- <a href="" class="collectAr h6 text-right" topic_id="<{//$vo.id}>">收藏</a> -->
                                                        &nbsp;&nbsp;<{$vo.ardnum}> 条评论
                                                    </p>
                                                </div>
                                                <div class="clearfix"></div>
                                                <div class="mt20"></div>
                                            <else/>
                                                <!-- 无主图 -->
                                                <div class="w100">
                                                    <p>
                                                        <{$vo.part}>... &nbsp;&nbsp;
                                                        <a href="<{:U('Article/show','arid='.$vo['arid'])}>">查看全文</a>
                                                    </p>
                                                    <p class="h6">
                                                        文章作者: &nbsp;&nbsp;<a href="<{:U('People/index','uid='.$vo['uid'])}>"><{$vo.uname}></a>&nbsp;&nbsp;
                                                        <b><{$vo.artime}></b>&nbsp;&nbsp;
                                                        &nbsp;&nbsp;<{$vo.ardnum}> 条评论
                                                    </p>
                                                    <div class="mt20"></div>
                                                </div>
                                            </notempty>
                                        </div>
                                    </div>
                                </volist>
                                <div class="clearfix"></div>
                                <div class="mt20"></div>
                                <div class="w100">
                                    <a href="<{:U('Explore/index', array('name'=>$name, 'type'=>'article','p'=>$p))}>" class="btn btn-sm btn-default form-control">查看更多推荐文章</a>
                                </div>
                                <div class="mb50"></div>
                            </empty>
                        </if>

                    </div>

                </div>

            </div>


            <!-- 右侧留空 -->
            <div class="col-md-3">
                
                                   <div class="h6 rightshow">
                        <a href="<{:U('Index/index')}>"  style="color:#888"><span class="glyphicon glyphicon-home"></span>&nbsp;&nbsp;知乎首页</a>

                        <a href="<{:U('Collections/index')}>"  style="color:#888"><span class="glyphicon glyphicon-bookmark"></span>&nbsp;&nbsp;我的收藏</a>

                        <a href="<{:U('Question/following')}>"  style="color:#888"><span class="glyphicon glyphicon-check"></span>&nbsp;&nbsp;我关注的问题</a>

                        <a href="<{:U('Topics/index')}>" style="color:#888"><span class="glyphicon glyphicon-th-large"></span>&nbsp;&nbsp;话题广场</a>

                    </div>

                    <h5 class="mt30"> <b><img src="__PUBLIC__/images/2016-07-21_141413.jpg">&nbsp;&nbsp;知乎专栏</b> </h5>
                    <div class="h6 rightshow">
                        <a href="<{:U('Explore/index')}>"  style="color:#888">发现</a>
                        <a href="<{:U('Article/index')}>"  style="color:#888">文章</a>
                    </div>
                    <div >© 2016 知乎</div>

            </div>
        </div>
    </div>


</block>

<block name="myjs">

</script>

</block>


